<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>用户激活</title>
    <script type="text/javascript">
        function go(secs, surl) {
            document.getElementById("time_label").innerText = secs;
            if (--secs > 0) {
                setTimeout("go(" + secs + ",'" + surl + "')", 1000); //设定超时时间
            } else {
                location.href = surl; //跳转页面
            }
        }
    </script>
</head>

<body>
    激活成功! <span id="time_label">3</span>秒
    <script language=javascript>
        go(3, '{{reverse_url("login")}}');
    </script>
</body>

</html>